#ifndef __SYSINFO_H
#define __SYSINFO_H

#include <stdio.h>
#include <stdlib.h>
#include <iostream>

#include <string.h>


#define GIT_VERSION "353db76281262f7947485768f2f083bf8e0340c5"
#define GIT_BRANCH "master"



class CSysInfo
{
public:
    CSysInfo();

    static void GetDevName(char buf[],int bufsize);

    // 返回值以kHz为单位
    static void GetCurrFreq(char freqBuf[],int bufsize);

    // Git Version and Branch
    // more : Complier Time
    static bool GetVersion(std::string &strGitVersion, std::string &strGitBranch);

    // Get Compile Time and Time
    static bool GetCompileDateTime(std::string &strCompileDate, std::string &strCompileTime);


    // Date & Time
    static bool GetRtcTime(std::string &strRtcTime);
    static bool GetRtcDate(std::string &strDateTime);

    static bool GetSystemTime(std::string &strSysTime);
    static bool GetSystemDate(std::string &strSysDate);
    static bool SetSystemTime(const std::string &strSetTime, bool bSetRtc);
    static bool SetSystemDate(const std::string &strSetTime, bool bSetRtc);

    // Ip
    static int GetDevIpAddr(char IpBuff[],int IpBuffsize);
    static int GetNetworkInfo(const std::string &strEthName, std::string &strMacAddr, 
                    std::string &strIpAddr, std::string &strNetMask, std::string &strGateWay);
};

#endif